[BLKTAP]: Fix potential grant entry leaks on error
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 20 Oct 2006 08:28:31 +0000 (09:28 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 20 Oct 2006 08:28:31 +0000 (09:28 +0100)
commitdbcc721001d302fda785dcebb2dc1c52d3b5d4b3
treea40c5e52595f94ca7a32b255a54216c7d823164a
parent97e34120fef1967b127046639498843df163ee3e
[BLKTAP]: Fix potential grant entry leaks on error

As it stands grant entries for the actual data are mapped in bulk.
If one of the earlier entries fail to be mapped, it can cause all
subsequent entries to be leaked if they were successfully mapped.

This patch changes it so that we will continue to reap grant entries
even when an error is detected.

There is still a potential leak if create_lookup_pte_addr fails
in fast_flush_area.  This leak is not affected by this patch.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c